﻿<Window x:Class="GoogleReaderToDelicious.WPF.Views.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:fwrk="clr-namespace:GoogleReaderToDelicious.WPF.Framework" 
        Title="Google reader to delicious export" Height="290" Width="324" WindowStartupLocation="CenterScreen"
        fwrk:ControlBox.HasMaximizeButton="false"
        >
    <Grid>
        <StackPanel Orientation="Vertical" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="5,5,0,0">

            <TextBlock VerticalAlignment="Top" HorizontalAlignment="Left" Text="{Binding Message}" 
                       Margin="0,0,0,20" TextWrapping="Wrap"></TextBlock>
            <Button Content="Reset" Width="81" VerticalAlignment="Top" HorizontalAlignment="Left"
                    Margin="0,0,0,10"
                    Command="{Binding ResetCommand}"
                        ></Button>
            <StackPanel Orientation="Horizontal" >
                <TextBlock Text="Notes JSON file"></TextBlock>
                <TextBox Width="129" Height="20"  IsReadOnly="True" Background="#D4D0C8"  Margin="5,0,0,0"
                         Text="{Binding JSONFilePath,Mode=OneWay}"></TextBox>
                <Button Content="Browse" Command="{Binding SelectJSONCommand}"></Button>
            </StackPanel>
            <Button Content="Import JSON" Command="{Binding ImportCommand}" Width="90" VerticalAlignment="Top" HorizontalAlignment="Left" ></Button>
            <StackPanel  Margin="0,10,0,0">
                <TextBlock Text="Delicious login details" FontWeight="Bold"></TextBlock>
                <Grid Margin="0,10,0,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="104"  />
                        <ColumnDefinition Width="184" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="25" />
                        <RowDefinition Height="25" />
                    </Grid.RowDefinitions>
                    <TextBlock Grid.Row="0" Grid.Column="0" Text="Username" ></TextBlock>
                    <TextBox Grid.Column="1"  Text="{Binding Username,Mode=TwoWay}" Width="184" Height="20" IsEnabled="{Binding CanChangeLoginDetails}"></TextBox>
                    <TextBlock Grid.Row="1" Grid.Column="0" Text="Password"></TextBlock>
                    <PasswordBox Grid.Row="1" Grid.Column="1"   Width="184" Height="20" IsEnabled="{Binding CanChangeLoginDetails}" PasswordChanged="PasswordBox_PasswordChanged"></PasswordBox>
                </Grid>
            </StackPanel>
            <Button Content="Export to delicious" Command="{Binding ExportCommand}" Width="107" VerticalAlignment="Top" HorizontalAlignment="Left"></Button>

        </StackPanel>
    </Grid>
</Window>
